<?php
//作者千柒qq743395324
namespace Home\Controller;

use Think\Controller;

class IndexController extends Controller
{
    public function index()
    {
        // $_SERVER['REQUEST_URI'];
        $data = M('classify')->order('id asc')->where(array('class_sid'=>0))->select();
        $this-> site = M('website')->where('id=1')->find();
        $this->assign('data',$data);

    	$this->display();
    }
    public function web_click()
    {
    	$id = I('post.id','','htmlspecialchars');
        $web = M('webdata')->where('id='.$id)->find();
        $data['click']=$web['click']+1;
        M('webdata')->where('id='.$id)->save($data);
    }

}
